import Home from './Home'
import About from './About'
import About2 from './About2'
import Login from './Login'
import {BrowserRouter, Route, Link, Routes} from "react-router-dom";
import Layout from "./Layout";
import Board from "./Board";
import Article from "./Article";
import NotFound from "./NotFound";

function App() {
    return (<BrowserRouter>
        <Link to="/">首页</Link>
        <Link to="/about">关于</Link>
        <Link to="/about2">关于2</Link>
        <Routes>
            <Route path="/" element={<Home></Home>}/>
            <Route path="/about" element={<About></About>}/>
            <Route path="/about2/:id" element={<About2></About2>}/>
            <Route path="/login" element={<Login></Login>}/>
            <Route path="/layout" element={<Layout></Layout>}>
                <Route index element={<Board/>}></Route>
                <Route path="article" element={<Article/>}></Route>
            </Route>
            <Route path="*" element={<NotFound/>}></Route>
        </Routes>
    </BrowserRouter>);
}

export default App;
